package data.nanjing.expo.models.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import data.nanjing.expo.common.Util;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * Created by zjp on 2018/7/4.
 * QQ：34948062
 * github: https://www.github.com/zjp1029
 * web： http://www.zjp1029.cn
 */
public class AuthInfo {

    private Integer id;
    private Integer userId;
    private String userName;
    private String address;
    private String idCardFrontPath;
    private String idCardReversePath;
    private String personEmail;
    private String companyName;
    private String companyAddress;
    private String contactName;
    private String contactPhone;
    private String companyEmail;
    private String licensePath;
    private String personCheckStatus;
    private String companyCheckStatus;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    private Date personApplyTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    private Date personPassTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    private Date companyApplyTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    private Date companyPassTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    private Date createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    private Date updateTime;
    private String personRefuseReason;
    private String companyRefuseReason;

    private String idFrontFinalPath;
    private String idReverseFinalPath;
    private String finalLiccensePath;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getIdCardFrontPath() {
        return idCardFrontPath;
    }

    public void setIdCardFrontPath(String idCardFrontPath) {
        this.idCardFrontPath = idCardFrontPath;
    }

    public String getIdCardReversePath() {
        return idCardReversePath;
    }

    public void setIdCardReversePath(String idCardReversePath) {
        this.idCardReversePath = idCardReversePath;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public String getCompanyAddress() {
        return companyAddress;
    }

    public void setCompanyAddress(String companyAddress) {
        this.companyAddress = companyAddress;
    }

    public String getContactName() {
        return contactName;
    }

    public void setContactName(String contactName) {
        this.contactName = contactName;
    }

    public String getContactPhone() {
        return contactPhone;
    }

    public void setContactPhone(String contactPhone) {
        this.contactPhone = contactPhone;
    }

    public String getCompanyEmail() {
        return companyEmail;
    }

    public void setCompanyEmail(String companyEmail) {
        this.companyEmail = companyEmail;
    }

    public String getLicensePath() {
        return licensePath;
    }

    public void setLicensePath(String licensePath) {
        this.licensePath = licensePath;
    }

    public String getPersonCheckStatus() {
        return personCheckStatus;
    }

    public void setPersonCheckStatus(String personCheckStatus) {
        this.personCheckStatus = personCheckStatus;
    }

    public String getCompanyCheckStatus() {
        return companyCheckStatus;
    }

    public void setCompanyCheckStatus(String companyCheckStatus) {
        this.companyCheckStatus = companyCheckStatus;
    }

    public Date getPersonApplyTime() {
        return personApplyTime;
    }

    public void setPersonApplyTime(Date personApplyTime) {
        this.personApplyTime = personApplyTime;
    }

    public Date getPersonPassTime() {
        return personPassTime;
    }

    public void setPersonPassTime(Date personPassTime) {
        this.personPassTime = personPassTime;
    }

    public Date getCompanyApplyTime() {
        return companyApplyTime;
    }

    public void setCompanyApplyTime(Date companyApplyTime) {
        this.companyApplyTime = companyApplyTime;
    }

    public Date getCompanyPassTime() {
        return companyPassTime;
    }

    public void setCompanyPassTime(Date companyPassTime) {
        this.companyPassTime = companyPassTime;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getPersonRefuseReason() {
        return personRefuseReason;
    }

    public void setPersonRefuseReason(String personRefuseReason) {
        this.personRefuseReason = personRefuseReason;
    }

    public String getCompanyRefuseReason() {
        return companyRefuseReason;
    }

    public void setCompanyRefuseReason(String companyRefuseReason) {
        this.companyRefuseReason = companyRefuseReason;
    }

    public String getPersonEmail() {
        return personEmail;
    }

    public void setPersonEmail(String personEmail) {
        this.personEmail = personEmail;
    }

    public String getIdFrontFinalPath() {
        return Util.getFinalFilePath(idCardFrontPath);
    }

    public String getIdReverseFinalPath() {
        return Util.getFinalFilePath(idCardReversePath);
    }

    public String getFinalLiccensePath() {
        return Util.getFinalFilePath(licensePath);
    }

    @Override
    public String toString() {
        return "AuthInfo{" +
                "id=" + id +
                ", userId=" + userId +
                ", userName='" + userName + '\'' +
                ", address='" + address + '\'' +
                ", idCardFrontPath='" + idCardFrontPath + '\'' +
                ", idCardReversePath='" + idCardReversePath + '\'' +
                ", companyName='" + companyName + '\'' +
                ", companyAddress='" + companyAddress + '\'' +
                ", contactName='" + contactName + '\'' +
                ", contactPhone='" + contactPhone + '\'' +
                ", companyEmail='" + companyEmail + '\'' +
                ", licensePath='" + licensePath + '\'' +
                ", personCheckStatus='" + personCheckStatus + '\'' +
                ", companyCheckStatus='" + companyCheckStatus + '\'' +
                ", personApplyTime=" + personApplyTime +
                ", personPassTime=" + personPassTime +
                ", companyApplyTime=" + companyApplyTime +
                ", companyPassTime=" + companyPassTime +
                '}';
    }
}
